package org.mendoza.salud.hvt.ui.cruds;

import com.vaadin.cdi.CDIView;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.VerticalLayout;
import org.mendoza.salud.hvt.model.global.Pais;

/**
 * Created by administrador on 27/03/15.
 */
@CDIView("CrudView")
public class CrudView extends CustomComponent implements View {
    public CrudView() {

    }

    @Override
    public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) {
        Layout layout = new VerticalLayout();
        this.setCompositionRoot(layout);
        Label label = new Label("Empezamos");
        layout.addComponent(label);
        CrudGenerator<Pais> crudGenerator = new CrudGenerator<Pais>(new Pais(), "nombre");
        layout.addComponent(crudGenerator);
    }

}
